<template>
	<!-- @touchmove.prevent禁止加载页面滑动事件 -->
	<view class="loading" v-if="showLoading" @touchmove.prevent>
		<u-loading mode="circle" :show="showLoading" :size="size"></u-loading>
	</view>
</template>

<script>
	export default {
		name: "loading",
		props: {
			showLoading: {
				type: Boolean,
				default: false
			},
			size: {
				type: Number,
				default: 50
			},
			mode: {
				type: String,
				default: 'circle'
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss" scoped>
	.loading {
		height: 100vh;
		display: flex;
		flex-flow: row nowrap;
		justify-content: center;
		align-items: flex-start;
		padding-top: 50%;
		box-sizing: border-box;
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		background-color: #FFFFFF;
		z-index: 999;
	}
</style>
